//
//  NEADDataEntity.m
//  NetEasyNews
//
//  Created by weiwang on 16/7/17.
//  Copyright © 2016年 王伟. All rights reserved.
//

#import "NEADDataEntity.h"

@implementation NEADDataEntity

#pragma mark- NSCodingDelegate
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:@(self.monitorReplaceDeviceId) forKey:@"monitorReplaceDeviceId"];
    [aCoder encodeObject:self.id forKey:@"id"];
    [aCoder encodeObject:self.ratio forKey:@"ratio"];
    [aCoder encodeObject:self.flight_id forKey:@"flight_id"];
    [aCoder encodeObject:@(self.show_num) forKey:@"show_num"];
    [aCoder encodeObject:self.sub_title forKey:@"sub_title"];
    [aCoder encodeObject:self.main_title forKey:@"main_title"];
    [aCoder encodeObject:self.vdeg forKey:@"vdeg"];
    [aCoder encodeObject:self.action_params forKey:@"action_params"];
    [aCoder encodeObject:@(self.thirdplat) forKey:@"thirdplat"];
    [aCoder encodeObject:self.location forKey:@"location"];
    [aCoder encodeObject:self.action forKey:@"action"];
    [aCoder encodeObject:self.ad_type forKey:@"ad_type"];
    [aCoder encodeObject:@(self.is_dsp_backup) forKey:@"is_dsp_backup"];
    [aCoder encodeObject:self.monitor forKey:@"monitor"];
    [aCoder encodeObject:@(self.ad_loc) forKey:@"ad_loc"];
    [aCoder encodeObject:self.category forKey:@"category"];
    [aCoder encodeObject:self.monitorShowUrl forKey:@"monitorShowUrl"];
    [aCoder encodeObject:self.video_url forKey:@"video_url"];
    [aCoder encodeObject:self.vdet forKey:@"vdet"];
    [aCoder encodeObject:self.res_url forKey:@"res_url"];

}

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self)
    {
        self.monitorReplaceDeviceId = [[aDecoder decodeObjectForKey:@"monitorReplaceDeviceId"] integerValue];
        self.id = [aDecoder decodeObjectForKey:@"id"];
        self.ratio = [aDecoder decodeObjectForKey:@"ratio"];
        self.flight_id = [aDecoder decodeObjectForKey:@"flight_id"];
        self.show_num = [[aDecoder decodeObjectForKey:@"show_num"] integerValue];
        self.sub_title = [aDecoder decodeObjectForKey:@"sub_title"];
        self.main_title = [aDecoder decodeObjectForKey:@"main_title"];
        self.vdeg = [aDecoder decodeObjectForKey:@"vdeg"];
        self.action_params = [aDecoder decodeObjectForKey:@"action_params"];
        self.thirdplat = [[aDecoder decodeObjectForKey:@"thirdplat"] integerValue];
        self.location = [aDecoder decodeObjectForKey:@"location"];
        self.action = [aDecoder decodeObjectForKey:@"action"];
        self.ad_type = [aDecoder decodeObjectForKey:@"ad_type"];
        self.is_dsp_backup = [[aDecoder decodeObjectForKey:@"is_dsp_backup"] integerValue];
        self.monitor = [aDecoder decodeObjectForKey:@"monitor"];
        self.ad_loc = [[aDecoder decodeObjectForKey:@"ad_loc"] integerValue];
        self.category = [aDecoder decodeObjectForKey:@"category"];
        self.monitorShowUrl = [aDecoder decodeObjectForKey:@"monitorShowUrl"];
        self.video_url = [aDecoder decodeObjectForKey:@"video_url"];
        self.vdet = [aDecoder decodeObjectForKey:@"vdet"];
        self.res_url = [aDecoder decodeObjectForKey:@"res_url"];
    }
    return self;
}
@end
